package com.dc.service.dto.electronic;

public enum ResultStatusCode {
    // 成功，返回的 JSON 数据将提供更多信息
    OK(200, "成功", "success"),
    // 客户端请求无效，例如请求体或参数错误
    INVALID_CLIENT(400, "客户端请求无效", "request invalid"),
    // 客户端未通过服务端认证，使用无效的身份验证凭据可能会发生
    LOGIN_FAIL(401, "无效的身份验证凭据", "authority invalid"),
    // 找不到请求的路径或者请求的对象不存在
    REQUEST_MISSION(404, "找不到请求的路径或者请求的对象不存在", "request url mission or request mission"),
    // 服务端处理请求时发生内部错误
    SYSTEM_ERR(500, "服务器运行异常", "server error");

//    SIGN_ERROR(120, "签名错误", "signature error"),
//    TIME_OUT(130, "访问超时", "time out"),
//    BAD_REQUEST(400, "参数解析失败", "bad request"),
//    INVALID_TOKEN(401, "无效的授权码", "invalid token"),
//    INVALID_CLIENTID(402, "无效的密钥", "invalid client id"),
//    UNAUTHO_ERROR(403, "您没有该权限", "unautho error"),
//    METHOD_NOT_ALLOWED(405, "不支持当前请求方法", "method not supported"),
//    ROLES_NOT_NULL(406, "请选择角色", "role can not be null"),
//    USER_NAME_EXISTS(407, "用户名已存在", "user name already exist"),
//    PACKAGE_NAME_EXISTS(408, "包名已存在", "package name already exist"),
//    DATASOURCE_NOT_EXISTS(409, "该数据源不存在", "datasource not exists"),
//    DATA_SYNC_ERROR(410, "数据同步失败", "data sync error"),
//    KICKED_OUT(411, "您已经在其他地方登录，请重新登录！", "has been kicked out"),
//    SQL_ERROR(412, "sql错误", "sql error"),
//    URL_ERROR(412, "url错误", "url error"),
//    NOT_EXIST_USER_OR_ERROR_PWD(10000, "该用户不存在或密码错误", "not exists user or error pwd"),
//    LOGINED_IN(10001, "该用户已登录", "user logged in"),
//    SHIRO_ERROR(10003, "登录异常", "shiro error"),
//    INVALID_CAPTCHA(30005, "无效的验证码", "invalid captcha"),
//    USER_FROZEN(40000, "该用户已被冻结", "user frozen");

    private Integer code;
    private String msg;
    private String enMsg;//英文

    ResultStatusCode(Integer code, String msg, String enMsg) {
        this.code = code;
        this.msg = msg;
        this.enMsg = enMsg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getEnMsg() {
        return enMsg;
    }

    public void setEnMsg(String enMsg) {
        this.enMsg = enMsg;
    }
}
